<template>
  <div>
    <h1>Event Bus Sublins02</h1>
    <div>{{ msg }}</div>
  </div>
</template>

<script>
import bus from './event-bus'
export default {
  data() {
    return {
      msg: ''
    }
  },
  created() {
    bus.$on('numchange', value => {
      this.msg = `您选择了${value} 件商品`
    })
  }
}
</script>

<style>

</style>